package cn.laixueit.logs;

import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;

@Component
@Aspect
public class Log {

    @Before("execution(* cn.laixueit.service.UserService.*(..))")
    public void addLogBefore(){
        System.out.println("add...之前");
    }

    @After("execution(* cn.laixueit.service.UserService.*(..))")
    public void addLogAfter(){
        System.out.println("add...之后");
    }
}
